﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DK.LinkedList;

public class LinkedNode<T> 
{
    internal int Index { get; set; }
    internal T? Data;
    internal LinkedNode<T>? Next;
    public LinkedNode(int index, T? data)
    {
        Index = index;
        Data = data;
    }

    public override string ToString()
    {
        return string.Format("Index:[{0}],Data:[{1}],Next:[{2}]",Index,Data?.ToString()??"null",Next != null);
    }

}
